<template>
  <nuxt-layout>
    <nuxt-page/>
  </nuxt-layout>
</template>

<script setup>
import {useIndexStore} from "~/store/index";
import 'element-plus/theme-chalk/dark/css-vars.css'
import {toggle} from "~/func/toggle.js";

const index = useIndexStore()
onMounted(async (e) => {
  const {width} = useWindowSize()
  index.isMobile = width.value < 768;
})

</script>

<style>
/*过渡到暗色模式时需要调整层级，否则会被遮住无法显示动画*/
.dark::view-transition-old(root) {
  z-index: 100;
}

::view-transition-new(root),
::view-transition-old(root) {
  /* 关闭默认动画，否则影响自定义动画的执行 */
  animation: none;
}

:root.dark {
  background: black;
}
</style>